package com.zetyun.tiger.connector.amt;

import com.fasterxml.jackson.annotation.JsonClassDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.zetyun.rt.meta.jsonschema.annotation.JsonSchemaTitle;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.apache.flink.streaming.connectors.redis.common.mapper.RedisCommand;

import java.util.Set;

@Getter
@Setter
@ToString
@JsonClassDescription("Redis 统计客户经理以及机构公共揽存今日存款总额")
public class CountAmtParameter {

    @JsonSchemaTitle("master名称")
    @JsonProperty(defaultValue = "redis-master")
    private String masterName;

    @JsonSchemaTitle("sentinel地址")
    @JsonProperty(defaultValue = "rdx1:26379")
    private Set<String> sentinels;

    @JsonSchemaTitle("密码")
    @JsonProperty(defaultValue = "Redis6379")
    private String password;

    @JsonSchemaTitle("数据库")
    @JsonProperty(defaultValue = "8")
    private Integer database;

    @JsonSchemaTitle("redis命令(默认为hset)")
    private RedisCommand rc = RedisCommand.HSET;

    @JsonSchemaTitle("客户经理所属机构缓存集合名称前缀")
    @JsonProperty(defaultValue = "DIM:RT:PEMS:ORG:AMT:")
    @JsonPropertyDescription("实际为 客户经理缓存集合 按照机构进行分组汇总的数据")
    private String pemsOrgKey;

    @JsonSchemaTitle("客户经理缓存集合名称前缀")
    @JsonProperty(defaultValue = "DIM:RT:CONNTR:AMT:")
    private String caKey;

    @JsonSchemaTitle("机构公共揽存缓存集合名称前缀")
    @JsonProperty(defaultValue = "DIM:RT:ORG:PD:AMT:")
    private String oaKey;

    @JsonSchemaTitle("时间日期字段")
    @JsonProperty(required = true, defaultValue = "CB_EVENT_DATE")
    private String dateField;

    @JsonSchemaTitle("机构号字段")
    @JsonProperty(required = true, defaultValue = "CB_OPAC_INSTN_NO")
    private String orgField;

    @JsonSchemaTitle("客户经理号字段")
    @JsonProperty(required = true, defaultValue = "CB_CONNTR_NO")
    private String conntrField;

    @JsonSchemaTitle("客户经理所属机构号字段")
    @JsonProperty(required = true, defaultValue = "CB_PA_OPUN_COD")
    private String pemsOrgField;

    @JsonSchemaTitle("金额字段")
    @JsonProperty(required = true, defaultValue = "CB_TX_AMT")
    @JsonPropertyDescription("金额字段")
    private String amtField;

    @JsonSchemaTitle("客户经理今日金额")
    @JsonProperty(required = true, defaultValue = "CB_RT_CONNTR_AMT")
    @JsonPropertyDescription("客户经理今日金额字段")
    private String rtConntrAmtField;

    @JsonSchemaTitle("机构揽存今日金额")
    @JsonProperty(required = true, defaultValue = "CB_RT_ORG_PD_AMT")
    @JsonPropertyDescription("机构揽存今日金额字段")
    private String rtOrgPdAmtField;


    @JsonSchemaTitle("机构今日金额")
    @JsonProperty(required = true, defaultValue = "CB_RT_ORG_AMT")
    @JsonPropertyDescription("机构今日金额字段")
    private String rtOrgAmtField;


    @JsonSchemaTitle("公共揽存标志")
    @JsonProperty(required = true, defaultValue = "CB_PUB_DEP_FLG")
    @JsonPropertyDescription("公共揽存标志字段")
    private String pubDepFlag;

}
